﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;

namespace JJYYCore
{
    public class EventsManager
    {
        private EventsDictionary actions;
        public EventDatas datas { private set; get; }

        public void AddEvent(string id, Action action) => actions.Add(id, action);
        public void RemoveEvent(string id) => actions.RemoveEvent(id);
        public void FireEvent(string id) => actions.FireEvent(id);

        public EventsManager()
        {
            datas = new EventDatas();
            actions = new EventsDictionary();
        }
    }
}